home *** CD-ROM | disk | FTP | other *** search
- /*
- *
- * net_stuff.h: Interface definition to network stuff.
- *
- */
-
- #include "mactcpcommontypes.h"
- #include "tcppb.h"
- #include "udppb.h"
-
- typedef StreamPtr stream;
- typedef StreamPtr handle_t;
- #define notify_proc_t UDPNotifyProc
- typedef Ptr user_data_ptr_t;
- typedef struct ICMPReport icmp_msg_t;
-
- #define STREAM_SIZE 4096
-
- int tcp_open_stream(ip_addr dest_ip, ip_port dest_port, stream *sp);
- int tcp_close_stream(stream s);
- int tcp_send_data(stream s, char *addr, int len);
- int tcp_get_data(stream s, char *addr, int max_len, int *real_lenp);
- int udp_register (ip_port *local_port, user_data_ptr_t user_data_ptr, char *buffer,
- int len, handle_t *handle, notify_proc_t notify_proc);
- void udp_release (handle_t handle);
- void notify_proc (handle_t handle, user_data_ptr_t user_data_ptr);
- int udp_send_dgram (handle_t handle, ip_addr dest_ip, ip_port dest_port,
- char *addr, int len);
- int udp_get_dgram (handle_t handle, ip_addr *dest_ip, ip_port *dest_port,
- char *addr, int max_len, int *real_lenp);
- int resolve_name(const char *in_name, char *cname, ip_addr *in_addrp);
-
- void get_my_ip_addr(ip_addr *my_address);
- void get_my_subnet_mask(long *my_subnet_mask);
-